# -*- coding: utf-8 -*-

# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html

from sct2.db.huxiu import dbhelper as huxiu
from sct2.db.qiantu import dbhelper as qiantu


class HuxiuPipeline(object):
    def __init__(self):
        self.db = huxiu()

    def process_item(self, item, spider):
        self.db.insert(item)
        return item


class QiantuPipeline(object):
    def __init__(self):
        self.db = qiantu()

    def process_item(self, item, spider):
        self.db.insert(item)
        return item


class Sct2Pipeline(object):
    def process_item(self, item, spider):
        return item
